from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import create_app, db, models

# 创建app
app = create_app('dev')

# 创建脚本管理器对象
manager = Manager(app)
# 让迁移和app和db建立关联
Migrate(app, db)
# 将迁移的脚本命令添加到manager
manager.add_command('mysql', MigrateCommand)





if __name__ == '__main__':

    manager.run()
